package dbAccess;

import java.util.ArrayList;

import dto.DTOClass;
import dto.DTOContact;
import dto.DTORelation;

/**
 * @author Jonathan Maret
 * Interface related to the DTORelation
 *
 * @param <DTORealtion>
 */
public interface RelationService<DTORelation> {

	/**
	 * @param contact
	 * @return Any relation related to a contact
	 */
	public ArrayList<DTORelation> getAllRelationByContact(DTOContact contact);
	/**
	 * @param clasS
	 * @return Any relation related to a class
	 */
	public ArrayList<DTORelation> getAllRelationByClass(DTOClass clasS);
	/**
	 * @param contact
	 * @param clasS
	 * @return The relation between a contact and a class
	 */
	public DTORelation getRelation(DTOContact contact, DTOClass clasS);
	/**
	 * Insert a relation into the database
	 * @param relation
	 */
	public void insertRelation(DTORelation relation);
	/**
	 * remove a relation from the database
	 * @param relation
	 */
	public void removeRelation(DTORelation relation);
	
}
